
import unittest

from HTMLTestRunner import  HTMLTestRunner

if __name__ == '__main__':

    # 测试报告
    test_report = 'test_report.html'

    # 创建套件
    suite = unittest.TestLoader().discover('cases','test*.py')


    # 写到测试报告中
    with open(test_report,'wb') as f:
        runner = HTMLTestRunner(f,title='钓鱼人测试报告',description='测试描述')
        runner.run(suite)